﻿using System;
using System.IO;
using System.Drawing;
using System.Collections.Generic;
using OpenGL;

namespace Exhibition
{
	public class CameraStage_Carpet : GLCameraStage
	{
		public override string ToString()
		{
			return "C\t" + (Carpetobj.Legend - 1)
				+ "\t" + Carpetobj.Height.ToString("0")
				+ "\t" + Carpetobj.Width.ToString("0")
				+ "\t" + Carpetobj.assignedwall.ID
				+ "\t" + (Carpetobj.BackSide ? "1" : "0")
				+ "\t" + Carpetobj.WallX.ToString("0.0")
				+ "\t" + Carpetobj.Text;
		}
		public Carpet Carpetobj;

		public CameraStage_Carpet(Carpet C)
			: base(C.CamPosition, C.CamTarget)
		{
			Carpetobj = C;
		}
	}

	public class CameraStage_Text : CameraStage_Carpet
	{
		public override string ToString()
		{
			return "T\t" + Carpetobj.assignedwall.ID
				+ "\t" + (Carpetobj.BackSide ? "1" : "0")
				+ "\t" + Carpetobj.WallX.ToString("0.0")
				+ "\t" + Carpetobj.Height.ToString("0")
				+ "\t" + Carpetobj.Width.ToString("0")
				+ "\t" + Carpetobj.Text;
		}

		public CameraStage_Text(Carpet T)
			: base(T)
		{
		}
	}
	public class GLWalkCamera : GLCamera
	{
		public const double PICTURE_FADE = 0.2;

		public GLWalkCamera()
		{
		}
		public GLWalkCamera(V3D pos, V3D dir)
			: base(pos, dir)
		{
		}
		public void AddCarpet(Carpet C)
		{
			AddStage(new CameraStage_Carpet(C));
		}
		public void AddStatic(V3D pos, V3D dir)
		{
			AddStage(new GLCameraStage(pos, dir));
		}
		public void AddText(Carpet C)
		{
			AddStage(new CameraStage_Text(C));
		}
	}
}